#!/bin/bash
set +e

at=
usb_port=/dev/ttyUSB0
../bin/cmux $usb_port
port_list=(`ls /dev/ttyGSM*`)
echo ${port_list[*]}
if [ ${#port_list[*]} -ge 4 ]; then
    at=${port_list[0]}
else
    exit "open fail"
fi

minicom -D $at